<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>地理采集信息数据管理</title>

    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>

    <style type="text/css">
        body{
            background-image: url(http://47.105.208.60:8080/wechat-api/images/loginbg.png);
            background-position: center center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-size: cover;
        }
        table#table {
            margin-left:auto;
            margin-right:auto;
            background: #F7F7F7;
            opacity:0.95;
            padding: 25px 15px 25px 10px;
            font: 12px Georgia, "Times New Roman", Times, serif;
            color: #888;
            text-shadow: 1px 1px 1px #FFF;
            border:1px solid #E4E4E4;
            text-align:center;
        }
        body h1 {
            font-size: 50px;
            padding: 0px 0px 10px 40px;
            display: block;
            color: slategrey;
            text-align:center;
        }
    </style>

    <script>
        var a;
        $.ajax({
            url: "http://47.105.208.60:8080/wechat-api/api/findAllAtlas"
            //url: "/api/findAllAtlas"
            , dataType: 'json'
            , type: 'POST'
            , success: function (data) {
                console.log("+++++++")
                console.log(data)
                var contentArr ='';

                if (data != '') {
                    for (var index in data){
                        var id = data[index].id;
                        var num = data[index].num;
                        var title = data[index].title;
                        var address = data[index].address;
                        var addresstype = data[index].addresstype;
                        var etype = data[index].etype;
                        var longitude = data[index].longitude;
                        var latitude = data[index].latitude;
                        var summary = data[index].summary;
                        var distinctive = data[index].distinctive;
                        var username = data[index].username;
                        var phonetype = data[index].phonetype;
                        var userphone = data[index].userphone;
                        var townsname = data[index].townsname;
                        var townsphone = data[index].townsphone;
                        var report = data[index].report;
                        var unit = data[index].unit;
                        var INF01 = data[index].inf01;


                        var content = "<tr id='tr-"+index+"' class='tr'>"+
                            "<td class='id' id='id' width='5%' style='table-layout:fixed'>"+id+"</td>"+
                            "<td class='num' width='5%' style='table-layout:fixed'>"+num+"</td>"+
                            "<td class='title' width='5%' style='table-layout:fixed'>"+title+"</td>"+
                            "<td class='address' width='7%' style='table-layout:fixed'>"+address+"</td>"+
                            "<td class='addresstype' width='5%' style='table-layout:fixed;display: none'>"+addresstype+"</td>"+
                            "<td class='etype' width='5%' style='table-layout:fixed'>"+etype+"</td>"+
                            "<td class='longitude' width='5%' style='table-layout:fixed'>"+longitude+"</td>"+
                            "<td class='latitude' width='5%' style='table-layout:fixed'>"+latitude+"</td>"+
                            "<td class='summary' width='5%' style='table-layout:fixed'>"+summary+"</td>"+
                            "<td class='distinctive' width='5%' style='table-layout:fixed'>"+distinctive+"</td>"+
                            "<td class='username' width='5%'style='table-layout:fixed'>"+username+"</td>"+
                            "<td class='phonetype' width='5%' style='table-layout:fixed'>"+phonetype+"</td>"+
                            "<td class='userphone' width='5%' style='table-layout:fixed'>"+userphone+"</td>"+
                            "<td class='townsname' width='5%' style='table-layout:fixed'>"+townsname+"</td>"+
                            "<td class='townsphone' width='5%' style='table-layout:fixed'>"+townsphone+"</td>"+
                            "<td class='report' width='5%' style='table-layout:fixed'>"+report+"</td>"+
                            "<td class='unit' width='5%' style='table-layout:fixed'>"+unit+"</td>"+
                            "<td class='INF01' width='3%' style='table-layout:fixed'>"+INF01+"</td>"+
                            "<td width='10%' style='table-layout:fixed'><button value='修改' onclick='xiugai1(this)'>修改</button></td>"+
                            "</tr>";
                        contentArr += content
                        console.log(index)
                    }
                    document.getElementById("tbody").innerHTML = contentArr;
                }
                else
                {
                    console.log("========")
                    alert("操作失败");//请求传输失败回调函数
                }
            }
            , error: function (msg) {
                console.log("----------")
                alert(msg); //错误信息

            }
        });
    </script>
    <script>

        function xiugai1(obj) {

            var $td = $(obj).parents('tr').children('td');
            var id = $td.eq(0).text();
            window.location.href="#(CPATH)/admin/invest/c?id="+id;

        }

    </script>
</head>

<body>
<div>

    <h1 style="text-align: center">地理详细信息</h1>

    <table border="1" id="table" style="height: 100%; width: 100%">

        <thead>
        <tr>
            <th>地理序号</th>
            <th>地点编号</th>
            <th>地点名称</th>
            <th>地点所属乡镇</th>
            <!--<th>地点类型</th>-->
            <th>坐标类型</th>
            <th>经度</th>
            <th>纬度</th>
            <th>简介</th>
            <th>乡镇特色</th>
            <th>联系人</th>
            <th>联系电话类型</th>
            <th>联系电话</th>
            <th>乡镇联系人</th>
            <th>乡镇联系电话</th>
            <th>上报人</th>
            <th>上报单位</th>
            <th>是否为体验点</th>
            <th>操作</th>
        </tr>
        <thead>

        <tbody id="tbody" class="tbody">

        </tbody>
    </table>
</div>

</body>
</html>